package com.soma.game.enums;

public enum GameStatus implements EnumWithValue {
    init("初始"), online("上架"), offline("下架");

    private final String value;

    GameStatus(String value) {
        this.value = value;
    }

    public String getName() {
        return this.name();
    }

    @Override
    public String getValue() {
        return value;
    }

    public static GameStatus fromValue(String disName) {
        for (GameStatus booleanStatus : GameStatus.values()) {
            if (booleanStatus.value.equals(disName)) {
                return booleanStatus;
            }
        }
        return null;
    }


    @Override
    public String toString() {
        return this.name();
    }
}
